Macro Chetisix[9]

This macro typesets a six-membered ring with one hetero atom. Thus it can be used to print ring systems such as pyridine and pyran. The arguments were selected by considering actually occurring compounds such as the B vitamins niacin and pyridoxine and the coumarin ring system. Ring positions 1–6 are the positions to which R1R6 are attached.

$\displaystyle \hetisix$$R1$$R2$$R3$$R4$$R5$$R6$DD$N$   $\displaystyle \hetisix$QQQQQQ$R7$QO

Argument 1:
An argument of ``Q'' causes no action. An argument of ``D'' prints a second bond between positions 1 and 6. All other arguments values are used as the substituent formula R1.
Arguments 2–6:
An argument of ``Q'' causes no action. All other argument values are used as the respective substituent formulas R2R6.
Argument 7:
An argument of ``Q'' causes no action. An argument of ``D'' prints a second bond between positions 2 and 3. All other argument values cause an outside double bond to be drawn from position 2 and the argument itself to be put at the end of the double bond as R7.
Argument 8:
An argument of ``D'' prints a second bond between positions 4 and 5. All other argument values cause no action.
Argument 9:
The atomic symbol of the hetero atom.